#!/bin/bash

./autogen.sh

#For DLAP221-ATLS200
PYTHON=/usr/local/python3.7.5/bin/python3.7 ./configure \
	--with-ascend=/home/HwHiAiUser/Ascend/ascend-toolkit/latest \
	--with-ascendminios=/home/HwHiAiUser/Ascend/ascend-toolkit/latest \
	--with-ascenddriver=/home/HwHiAiUser/workspace/chuanda/AscendFaiss/driver \
	--with-faiss=/usr/local	
result=$?
if [ ${result} -ne 0 ]; then
    echo "[ERROR] check environment failed!"
    exit 1
fi

make -j 4
result=$?
if [ ${result} -ne 0 ]; then
    echo "[ERROR] make failed!"
    exit 1
fi
